import { IQuestions } from '@/pages/Home/TestQuestions'
import { View, Text } from '@tarojs/components'
import React from 'react'
import { AtTextarea } from 'taro-ui'

import './index.scss'

interface ICTestInput {
  data: IQuestions
  index: number
  value: string
  handleChange: (v) => void
}
/* 
测试题填空专用
*/
export default function CTestInput(params: ICTestInput) {
  const { data, index, value, handleChange } = params
  return (
    <View className='TestInput'>
      <Text className='title'>{index + '、' + data.question}</Text>

      <View className='test-box'>
        <AtTextarea count={false} value={value} onChange={handleChange} maxLength={200} placeholder='请填写答案' />
      </View>
    </View>
  )
}
